package com.woniu.common.api.status.Impl;

import com.woniu.common.api.status.IStatusCode;
import lombok.Getter;

/**
 * 公共返回结果业务编码
 */
@Getter
public enum BusinessCode implements IStatusCode {

    /* 业务错误：10000-19999 */
    ADD_SUCCESS(10000,"新增成功！"),
    ADD_FAIL(10001,"新增失败！"),
    MODIFY_SUCCESS(11000,"修改成功！"),
    MODIFY_FAIL(11001,"修改失败！"),
    REMOVE_SUCCESS(12000,"删除成功！"),
    REMOVE_FAIL(12001,"删除失败！"),
    LOGIN_FAIL(13001,"登录失败！用户名或密码错误！"),
    SESSION_TIMEOUT(13002,"session超时，请重新登录！"),
    NO_AUTH(13003,"没有权限访问请求资源，请切换账户后重试！"),
    ASSIGN_SUCCESS(15000,"分配成功！"),
    ASSIGN_FAIL(15001,"分配失败！"),
    ORDER_SUCCESS(16000,"排序成功！"),
    ORDER_FAIL(16001,"排序失败！");

    //状态码
    private int code;

    //消息
    private String message;

    //构造
    BusinessCode(int code,String message){
        this.code = code;
        this.message = message;
    }

}